3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines for creating a new view and for getting or setting a view's renderer, camera, light group, and draw context.
You can use the Q3View_New function to create a new view object.
TQ3ViewObject Q3View_New (void);
The Q3View_New function returns, as its function result, a new view object. Before you can render a model in that view, you must first set the view's renderer, camera, and draw context. You can also set the view's group of lights. Q3View_New returns NULL if it cannot create a new view object.
You can use the Q3View_GetRenderer function to get the renderer associated with a view.
TQ3Status Q3View_GetRenderer (
TQ3ViewObject view,
TQ3RendererObject *renderer);
You can use the Q3View_SetRenderer function to set the renderer associated with a view.
TQ3Status Q3View_SetRenderer (
TQ3ViewObject view,
TQ3RendererObject renderer);
The Q3View_SetRenderer function attaches the renderer specified by the renderer parameter to the view specified by the view parameter. The reference count of the specified renderer is incremented. In addition, if some other renderer was already attached to the specified view, the reference count of that renderer is decremented.
For information on creating and manipulating renderers, see the chapter "Renderer Objects."
You can use the Q3View_SetRendererByType function to set the renderer associated with a view by specifying its type.
TQ3Status Q3View_SetRendererByType (
TQ3ViewObject view,
TQ3ObjectType type);
The Q3View_SetRendererByType function attaches the renderer having the type specified by the type parameter to the view specified by the view parameter. The reference count of the specified render is incremented. In addition, if some other renderer was already attached to the specified view, the reference count of that renderer is decremented.
You can use the Q3View_GetCamera function to get the camera associated with a view.
TQ3Status Q3View_GetCamera (
TQ3ViewObject view,
TQ3CameraObject *camera);
You can use the Q3View_SetCamera function to set the camera associated with a view.
TQ3Status Q3View_SetCamera (
TQ3ViewObject view,
TQ3CameraObject camera);
The Q3View_SetCamera function attaches the camera specified by the camera parameter to the view specified by the view parameter. The reference count of the specified camera is incremented. In addition, if some other camera was already attached to the specified view, the reference count of that camera is decremented.
For information on creating and manipulating cameras, see the chapter "Camera Objects."
You can use the Q3View_GetLightGroup function to get the light group associated with a view.
TQ3Status Q3View_GetLightGroup (
TQ3ViewObject view,
TQ3GroupObject *lightGroup);
You can use the Q3View_SetLightGroup function to set the light group associated with a view.
TQ3Status Q3View_SetLightGroup (
TQ3ViewObject view,
TQ3GroupObject lightGroup);
The Q3View_SetLightGroup function attaches the light group specified by the lightGroup parameter to the view specified by the view parameter. The reference count of the specified light group is incremented. In addition, if some other light group was already attached to the specified view, the reference count of that light group is decremented.
For information on creating and manipulating light groups, see the chapters "Light Objects" and "Group Objects."
You can use the Q3View_GetDrawContext function to get the draw context associated with a view.
TQ3Status Q3View_GetDrawContext (
TQ3ViewObject view,
TQ3DrawContextObject *drawContext);
You can use the Q3View_SetDrawContext function to set the draw context associated with a view.
TQ3Status Q3View_SetDrawContext (
TQ3ViewObject view,
TQ3DrawContextObject drawContext);
The Q3View_SetDrawContext function attaches the draw context specified by the drawContext parameter to the view specified by the view parameter. The reference count of the specified draw context is incremented. In addition, if some other draw context was already attached to the specified view, the reference count of that draw context is decremented.
For information on creating and manipulating draw contexts, see the chapter "Draw Context Objects."
Previous | QD3D Book | Overview | Chapter Contents | Next |